/*
 * Node.h
 *
 *  Created on: Nov 23, 2009
 *      Author: abhishek
 */

#ifndef NODE_H_
#define NODE_H_

#include "Headers.h"

class Node {
public:
	Node(int id);
	virtual ~Node();


	Node* parent(){ return parent_ ;}
	void parentIs(Node* node){parent_ = node ;}

	int nodeId() {return nodeId_ ;}
	void nodeIdIs(int id){nodeId_ = id ;}

	int numNegativeSigns(){return numNegativeSigns_ ;}
	void numNegativeSignsIs(int value){ numNegativeSigns_ = value;}

	bool isVisited() {return isVisited_  ;}
	void isVisitedIs(bool value){ isVisited_ = value ;}

	vector<Node*> children(){return children_ ;}
	void childrenAdd(Node* node){ children_.push_back(node); }

	int depth(){return depth_ ; }
	void depthIs(int value){depth_ = value ;}

	void resetNode();

	string toString();
private:
	Node* parent_ ;
	int nodeId_ ;
	int numNegativeSigns_ ; // from the root.
	bool isVisited_ ; // by default it is false
	vector<Node*> children_ ;
	int depth_ ;
};

#endif /* NODE_H_ */
